package com.system.boss.optlog.model;

import com.nh.micro.ext.ExtBeanWrapper;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.Serializable;
import java.util.Date;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.Data;

/**
 *
 * boss操作日志
 *
 * @author 江路
 **/
@Data
public class BossOptLog implements Serializable {
    @Schema(description = "主键")
    @Min(value = 0,message = "logId必须大于0")
	@NotNull(message = "logId字段必填")
    private Long logId;

    @Schema(description = "用户ID")
    private Long userId;

    @Schema(description = "来源")
    private Integer source;

    @Schema(description = "操作人称谓")
    private String optUserName;

    @Schema(description = "操作人IP地址")
    private String ipAddr;

    @Schema(description = "位置信息")
    private String location;

    @Schema(description = "操作项")
    private String optItemCode;

    @Schema(description = "入参")
    private String params;

    @Schema(description = "扩展记录")
    private ExtBeanWrapper extendJson;

    @Schema(description = "备注")
    private String comment;

    @Schema(description = "记录创建时间")
    private Date createTime;

    @Schema(description = "记录更新时间")
    private Date updateTime;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database table boss_opt_log
     *
     * @mbg.generated
     */
    private static final long serialVersionUID = 1L;

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table boss_opt_log
     *
     * @mbg.generated
     */
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(" {");
        sb.append("\"ClassName\" : \"").append(getClass().getSimpleName());
        sb.append("\",\"Hash\" : ").append(hashCode());
        sb.append(", \"logId\" : ").append(logId);
        sb.append(", \"userId\" : ").append(userId);
        sb.append(", \"source\" : ").append(source);
        sb.append(", \"optUserName\" : ").append("\""+optUserName+"\"");
        sb.append(", \"ipAddr\" : ").append("\""+ipAddr+"\"");
        sb.append(", \"location\" : ").append("\""+location+"\"");
        sb.append(", \"optItemCode\" : ").append("\""+optItemCode+"\"");
        sb.append(", \"params\" : ").append("\""+params+"\"");
        sb.append(", \"extendJson\" : ").append(extendJson);
        sb.append(", \"comment\" : ").append("\""+comment+"\"");
        sb.append(", \"createTime\" : ").append("\""+createTime+"\"");
        sb.append(", \"updateTime\" : ").append("\""+updateTime+"\"");
        sb.append(", \"serialVersionUID\" : ").append(serialVersionUID);
        sb.append("}");
        return sb.toString();
    }
}